package com.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.entity.StudentInfo;
import com.mapper.StudentMapper;
@Service @Transactional
public class StuServiceImpl implements StuService{
	@Autowired
	private StudentMapper studentMapper;
	public List<StudentInfo> getList() {
		return studentMapper.stuList();
	}
	@Override
	public void addStu(StudentInfo stu) {
		studentMapper.addStu(stu);
	}
	@Override
	public StudentInfo login(String stuName, String password) {
		return studentMapper.login(stuName,password);
		
	}
	@Override
	public StudentInfo getStuByid(Integer stuId) {
		return studentMapper.getStuByid(stuId);
	}
	@Override
	public void delStu(Integer stuId) {
		studentMapper.delStu(stuId);
	}
	@Override
	public void updateStu(StudentInfo stu) {
		studentMapper.updateStu(stu);
		
	}

}
